package com.bonc.situation.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.bonc.situation.service.TestService;
import com.bonc.situation.vo.TestBean;


@RestController
@RequestMapping("")
public class TestController {
	private static final Logger logger = LoggerFactory.getLogger(TestController.class);
	@Autowired
	private TestService service;
	@RequestMapping(value="/testId/{id}" +
			"",method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
	@ResponseBody
	public TestBean getById(@PathVariable("id") String id)throws Exception{
		logger.info("getById");
		return service.getByCityId(id);
	}
}
